# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=python-systemd
pkgver=235
pkgrel=2
pkgdesc="Python bindings for systemd"
url="https://github.com/systemd/python-systemd"
arch=(loong64 x86_64)
license=(LGPL)
depends=(python systemd)
makedepends=(python-setuptools git)
_commit=dc1dae2eaa00e2369c366f80f9bcd3f729b7abca  # tags/v235^0
source=("git+$url#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^v//;s/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  cd $pkgname
  make
}

package() {
  cd $pkgname
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}
